<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index4.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
   <br>
   <form id="loginform">
     账号<input  type="text"name="name"><br>
   密码<input  type="password"name="pwd"> <br>
   <input name="submit" type="submit" value="登陆"><br>
    <script type="text/javascript">
var a=0;
alert(a);
console.log(a);
var al=new Array();
a[0]=1;
a[2]=2.2;
for(var i=0;i<al.length;i++){
alert(al);
console(al);
}
var form1=document.getElementByld("loginform");
alert(form1);
console.log(form1);
var name=document.getElementByld("name").value;
var key=document.getElementByld("pwd").value;
console.log(name);
if(name=="www"&&key=="ddd"){
	console.log(1);
form1.submit();}
else{
	console.log(2);
window.open("error.jsp");}
</script>
   </form>
  </body>
</html>
